﻿@using ZhouYu.DreamTour.Model;
@using ZhouYu.DreamTour.Web.Models;
@{
    var id = ViewBag.UserId as Usercomment;
    var orders = ViewBag.ordes as List<OrderInfo>;
    var Unpaid = ViewBag.Unpaid as List<OrderInfo>;
    var Comment = ViewBag.Comment as List<OrderInfo>;
    var Receivng = ViewBag.Receiving as List<OrderInfo>;
    var UserInfo = UserInfoContext.userInfoContext.UserInfo;

}

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="~/layui-v2.5.4/layui/css/layui.css" media="all" />
    <link href="~/css/style.css" rel="stylesheet" type="text/css" />
    <link href="~/css/common.css" rel="stylesheet" type="text/css" />
    <link href="~/css/Order.css" rel="stylesheet" type="text/css" />

    <style>
        #ss {
            padding-left: 350px;
        }

        #evaluate {
            display: none;
        }
    </style>
</head>
<body>
    <div class="top_hw clearfix">
        <div class="top_h clearfix">
            <div class="top_hl"><span>欢迎来到中国梦想游，让你的梦想全程免费自由行！</span> 预定热线：<b>0571-63322269</b></div>
            <div class="top_hr">
                @if (UserInfo == null)
                {
                    <a href="/Home/User_Register">会员注册</a>
                    <span>|</span> <a href="/Home/User_Login">登录</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a>
                    @*<a>
                            欢迎你，来到新世界旅行网！
                        </a>*@
                }
                else
                {
                    <a href="/Home/User_Center">会员中心</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a> <span>|</span> <a href="/Login/LoginOut">退出</a> <span>|</span>
                    <a>
                        欢迎你，<span>@UserInfo.User_Name</span>来到新世界旅行网！
                    </a>
                }
            </div>
        </div>
    </div>
    <div class="head_w">
        <div class="head_t clearfix">
            <div class="logo"><img src="~/images/logo.jpg"></div>
            <div class="rx_line"><img src="~/images/rx.jpg"></div>
        </div>
    </div>
    <div class="mainNav clearfix">
        <ul class="Nav_ul">
            <li><a href="/Home/Index">首页</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Route">旅游路线</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Scenic">旅游景点</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/CateringAccommodation">餐饮住宿</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Traffic_DatailsOne">交通线路</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Group">旅游团购</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Specialty">地方特产</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/AutoGenerationIntro">自动生成简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Team_Join">团队简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Itinerary_Details">行程导航</a></li>
        </ul>
    </div>
    <div class="b_wrap">
        <div class="current"><span>当前所在地：</span><a href="/Home/Index">首页</a> >> <a href="/Home/User_Center">会员中心</a></div>
        <div class="fmember">
            <div class="fmleft">
                <div class="fmleft_top"><img src="~/images/fmbt1.png" border="0"></div>
                <div class="fmlist">
                    <ul>
                        <li class="f1">订单中心</li>
                        <li> >><a href="/Home/User_Order">我的订单</a> </li>
                        <li> >><a href="/Home/User_Colleague">发布结伴同行</a> </li>
                        <li> >><a href="/Home/User_Apply">我申请的结伴同行</a> </li>
                        <li> >><a href="/Home/User_Comment">我的点评</a> </li>
                        <li class="f2"> >><a href="/Home/User_Questions">我的提问</a> </li>
                    </ul>
                    <ul>
                        <li class="f1">我的优惠卡券</li>
                        <li> >><a href="/Home/User_CashAccount">现金账号</a> </li>
                        <li> >><a href="/Home/User_AllowanceVol">抵用券</a> </li>
                        <li class="f2"> >><a href="/Home/User_TouristVol">旅游券</a> </li>
                    </ul>
                    <ul>
                        <li class="f1">账户信息</li>
                        <li> >><a href="/Home/User_Data">个人资料</a> </li>
                        <li> >><a href="/Home/User_AccountSecurity">账户安全</a> </li>
                        <li> >><a href="/Home/User_Integral">我的积分</a> </li>
                        <li> >><a href="/Home/User_UpdatePwd">修改密码</a> </li>
                        <li class="f2"> >><a href="/Home/User_Address">配送地址</a> </li>
                    </ul>
                </div>
            </div>
            <div class="fmright">
                <div class="fmr1">
                    <div class="fmr1_top">我的订单</div>
                    <div class="fmr1_m">
                        <div id="evaluate">
                            <p id="numnames" style="display:none"><p>
                                <h3 id="businessname">
                                    <img id="Order_img" src="" style="height:70px;width:70px">
                                    <span id="Order_Type"></span>
                                    <span id="evaluatenum" style="display:none;"></span>
                                    <span id="orderId" style="display:none;"></span>
                                    <span id="User_Id" style="display:none;"></span>
                                </h3>
                                <div id="test5"></div>&nbsp;&nbsp;<strong><span id="numtest"></span></strong>

                                <div>
                                    <textarea id="comment" placeholder="亲，写点评价吧，你的评价对其他买家有很大帮助的。" class="layui-textarea"></textarea>
                                    <br />
                                </div>
                                <br />

                                <button type="button" style="text-align:center; margin-left:340px;" id="btncomment" class="layui-btn layui-btn-normal">发表评论</button>
                        </div>

                        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                            <ul class="layui-tab-title">
                                <li class="layui-this">所有订单</li>
                                @if (Unpaid.Count != 0)
                                {
                                    <li>待付款<span class="layui-badge">@Unpaid.Count</span></li>
                                }
                                else
                                {
                                    <li>待付款</li>
                                }
                                @if (Comment.Count != 0)
                                {
                                    <li>待点评<span class="layui-badge">@Comment.Count</span></li>
                                }
                                else
                                {
                                    <li>待点评</li>

                                }
                                @if (Receivng.Count != 0)
                                {
                                    <li>待收货<span class="layui-badge">@Receivng.Count</span></li>
                                }
                                else
                                {
                                    <li>待收货</li>
                                }
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <section class="aui-flexView">
                                        <section class="aui-scrollView">
                                            <div class="aui-tab" data-ydui-tab>
                                                <div class="tab-panel">
                                                    <div class="tab-panel-item tab-active">
                                                        @foreach (var item in orders)
                                                        {
                                                            <div class="tab-item">
                                                                <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                                                    <div class="aui-well-item-hd">
                                                                        <img src="~/images/shop.png" style="height:80px">
                                                                    </div>
                                                                    <div class="aui-well-item-bd">
                                                                        <p id="oreder_Name" style="color:#000000;">商家名称:@item.Order_Name</p>
                                                                    </div>

                                                                    @if (item.Order_Type == "特产")
                                                                    {
                                                                        if (item.Order_Status == 2)
                                                                        {
                                                                            <p style="color:#ff0000;">买家已付款<br />发货中...</p>
                                                                        }
                                                                        else if (item.Order_Status == 4)
                                                                        {
                                                                            <p style="color:#ff0000;">交易成功</p>
                                                                        }
                                                                        else if (item.Order_Status == 1)
                                                                        {
                                                                            <p style="color:#ff0000;">待点评</p>
                                                                        }
                                                                        else if (item.Order_Status == 0)
                                                                        {
                                                                            <p style="color:#ff0000;">待付款</p>
                                                                        }
                                                                    }
                                                                    else
                                                                    {
                                                                        if (item.Order_Status == 0)
                                                                        {
                                                                            <p style="color:#ff0000;">待付款</p>
                                                                        }
                                                                        else if (item.Order_Status == 1)
                                                                        {
                                                                            <p style="color:#ff0000;">待点评</p>

                                                                        }
                                                                        else if (item.Order_Status == 4)
                                                                        {
                                                                            <p style="color:#ff0000;">交易成功</p>
                                                                        }

                                                                    }
                                                                </a>
                                                                <p>订 单 号：@item.Order_No</p>

                                                                <div class="aui-mail-product">

                                                                    <a href="javascript:;" class="aui-mail-product-item">

                                                                        <div class="aui-mail-product-item-hd">

                                                                            <img src="@item.Orde_PictureUrl" style="height:70px;width:70px;" alt="">

                                                                        </div>
                                                                        <div class="aui-mail-product-item-bd">
                                                                            <p>@item.Order_ProInfo</p>
                                                                            @if (item.Order_Type == "特产")
                                                                            {
                                                                                <p id="ss">下单时间：@item.Order_ReserveTime</p>
                                                                                if (item.Order_Status == 1 || item.Order_Status == 4)
                                                                                {
                                                                                    <p id="ss">到货时间：@item.Order_OutingTime</p>
                                                                                }
                                                                            }
                                                                            else if (item.Order_Type == "旅游")
                                                                            {
                                                                                <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                <p id="ss">出游时间：@item.Order_OutingTime</p>
                                                                            }
                                                                            else if (item.Order_Type == "团购")
                                                                            {
                                                                                <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                <p id="ss">出游时间：@item.Order_OutingTime</p>

                                                                            }
                                                                            else if (item.Order_Type == "餐饮")
                                                                            {
                                                                                <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                <p id="ss">就餐时间：@item.Order_OutingTime</p>
                                                                            }
                                                                            else if (item.Order_Type == "酒店")
                                                                            {
                                                                                <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                <p id="ss" class="IntoTime">入住时间：@item.Order_OutingTime</p>
                                                                            }
                                                                        </div>
                                                                    </a>
                                                                </div>
                                                                <a href="javascript:;" class="aui-mail-payment">
                                                                    @if (item.Order_Type == "特产")
                                                                    {
                                                                        <p style="color:#000000;">
                                                                            共<em>1</em>
                                                                            件商品 实付款: ￥
                                                                            <i>@item.Order_Money</i>
                                                                        </p>
                                                                    }
                                                                    else
                                                                    {
                                                                        <p style="color:#000000;">
                                                                            总价: ￥<i>@item.Order_Money</i>
                                                                        </p>
                                                                    }
                                                                </a>
                                                                <div class="aui-mail-button">
                                                                    @if (item.Order_Type == "特产")
                                                                    {

                                                                        if (item.Order_Status == 2)
                                                                        {
                                                                            <a href="javascript:;" id="Receiving" onclick="Show('@item.Order_Id','@item.Order_No')">确定收货</a>
                                                                        }
                                                                        else if (item.Order_Status == 1)
                                                                        {
                                                                            <a href="javascript:;" onclick="Evaluates('@item.Orde_PictureUrl','@item.Order_Id','@item.User_Id','@item.Order_Type')">评价</a>
                                                                        }
                                                                        else if (item.Order_Status == 0)
                                                                        {
                                                                            <a href="javascript:;" onclick="payment('@item.Order_Id','@item.Order_Money','@item.Order_Type')">付款</a>
                                                                            <a href="javascript:;" class="aui-df-color" onclick="CancelSpecialty('@item.Order_Id')">取消订单</a>
                                                                        }
                                                                        else if (item.Order_Status == 4)
                                                                        {
                                                                            <a href="javascript:;" style="border:none">已评价</a>
                                                                        }
                                                                    }
                                                                    else
                                                                    {
                                                                        if (item.Order_Status == 0)
                                                                        {
                                                                            <a href="javascript:;" onclick="payment('@item.Order_Id','@item.Order_Money','@item.Order_Type')">付款</a>
                                                                            <a href="javascript:;" class="aui-df-color" onclick="CancelSpecialty('@item.Order_Id')">取消订单</a>
                                                                        }
                                                                        else if (item.Order_Status == 1)
                                                                        {
                                                                            <a href="javascript:;" onclick="Evaluates('@item.Orde_PictureUrl','@item.Order_Id','@item.User_Id','@item.Order_Type')">评价</a>
                                                                        }
                                                                        else if (item.Order_Status == 4)
                                                                        {
                                                                            <a href="javascript:;" style="border:none">已评价</a>
                                                                        }

                                                                    }
                                                                </div>
                                                            </div>
                                                            <div class="divHeight"></div>


                                                        }

                                                        @if (orders.Count == 0)
                                                        {
                                                            <div style="text-align:center;">
                                                                <img src="~/images/download.png">
                                                                <h5>没有订单哦~亲,赶紧去下单吧</h5>
                                                            </div>
                                                        }
                                                    </div>

                                                </div>
                                            </div>
                                        </section>
                                    </section>

                                </div>
                                <div class="layui-tab-item">
                                    <section class="aui-flexView">
                                        <section class="aui-scrollView">
                                            <div class="aui-tab" data-ydui-tab>
                                                <div class="tab-panel">
                                                    <div class="tab-panel-item tab-active">
                                                        @foreach (var item in orders)
                                                        {
                                                            if (item.Order_Status == 0)
                                                            {

                                                                <div class="tab-item">
                                                                    <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                                                        <div class="aui-well-item-hd">
                                                                            <img src="~/images/shop.png" style="height:80px">
                                                                        </div>
                                                                        <div class="aui-well-item-bd">
                                                                            <p id="oreder_Name" style="color:#000000;">商家名称:@item.Order_Name</p>
                                                                        </div>

                                                                        @if (item.Order_Type == "特产")
                                                                        {
                                                                            if (item.Order_Status == 2)
                                                                            {
                                                                                <p style="color:#ff0000;">买家已付款<br />发货中...</p>
                                                                            }
                                                                            else if (item.Order_Status == 4)
                                                                            {
                                                                                <p style="color:#ff0000;">交易成功</p>
                                                                            }
                                                                            else if (item.Order_Status == 1)
                                                                            {
                                                                                <p style="color:#ff0000;">待点评</p>
                                                                            }
                                                                            else if (item.Order_Status == 0)
                                                                            {
                                                                                <p style="color:#ff0000;">待付款</p>
                                                                            }
                                                                        }
                                                                    </a>
                                                                    <p>订 单 号：@item.Order_No</p>

                                                                    <div class="aui-mail-product">

                                                                        <a href="javascript:;" class="aui-mail-product-item">

                                                                            <div class="aui-mail-product-item-hd">

                                                                                <img src="@item.Orde_PictureUrl" style="height:70px;width:70px;" alt="">

                                                                            </div>
                                                                            <div class="aui-mail-product-item-bd">
                                                                                <p>@item.Order_ProInfo</p>
                                                                                @if (item.Order_Type == "特产")
                                                                                {
                                                                                    <p id="ss">下单时间：@item.Order_ReserveTime</p>
                                                                                    if (item.Order_Status == 3)
                                                                                    {
                                                                                        <p id="ss">到货时间：@item.Order_OutingTime</p>
                                                                                    }
                                                                                }
                                                                                else if (item.Order_Type == "旅游")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss">出游时间：@item.Order_OutingTime</p>
                                                                                }
                                                                                else if (item.Order_Type == "团购")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss">出游时间：@item.Order_OutingTime</p>

                                                                                }
                                                                                else if (item.Order_Type == "餐饮")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss">就餐时间：@item.Order_OutingTime</p>
                                                                                }
                                                                                else if (item.Order_Type == "酒店")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss" class="IntoTime">入住时间：@item.Order_OutingTime</p>
                                                                                }
                                                                            </div>
                                                                        </a>
                                                                    </div>
                                                                    <a href="javascript:;" class="aui-mail-payment">
                                                                        @if (item.Order_Type == "特产")
                                                                        {
                                                                            <p style="color:#000000;">
                                                                                共<em>1</em>
                                                                                件商品 实付款: ￥
                                                                                <i>@item.Order_Money</i>
                                                                            </p>

                                                                        }
                                                                        else
                                                                        {
                                                                            <p style="color:#000000;">
                                                                                总价: ￥<i>@item.Order_Money</i>
                                                                            </p>
                                                                        }
                                                                    </a>
                                                                    <div class="aui-mail-button">
                                                                        @if (item.Order_Type == "特产")
                                                                        {

                                                                            if (item.Order_Status == 0)
                                                                            {
                                                                                <a href="javascript:;" onclick="payment('@item.Order_Id','@item.Order_Money','@item.Order_Type')">付款</a>
                                                                                <a href="javascript:;" class="aui-df-color" onclick="CancelSpecialty('@item.Order_Id')">取消订单</a>
                                                                            }
                                                                        }
                                                                        else
                                                                        {
                                                                            if (item.Order_Status == 0)
                                                                            {
                                                                                <a href="javascript:;" onclick="payment('@item.Order_Id','@item.Order_Money','@item.Order_Type')">付款</a>
                                                                                <a href="javascript:;" class="aui-df-color" onclick="CancelSpecialty('@item.Order_Id')">取消订单</a>
                                                                            }
                                                                        }
                                                                    </div>
                                                                </div>
                                                                <div class="divHeight"></div>


                                                            }
                                                        }
                                                        @if (Unpaid.Count == 0)
                                                        {
                                                            <div style="text-align:center;">
                                                                <img src="~/images/download.png">
                                                                <h5>没有待付款的订单哦~</h5>
                                                            </div>
                                                        }
                                                    </div>

                                                </div>
                                            </div>
                                        </section>
                                    </section>
                                </div>
                                <div class="layui-tab-item">
                                    <section class="aui-flexView">
                                        <section class="aui-scrollView">
                                            <div class="aui-tab" data-ydui-tab>
                                                <div class="tab-panel">
                                                    <div class="tab-panel-item tab-active">
                                                        @foreach (var item in orders)
                                                        {
                                                            if (item.Order_Status == 1)
                                                            {

                                                                <div class="tab-item">
                                                                    <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                                                        <div class="aui-well-item-hd">
                                                                            <img src="~/images/shop.png" style="height:80px">
                                                                        </div>
                                                                        <div class="aui-well-item-bd">
                                                                            <p id="oreder_Name" style="color:#000000;">商家名称:@item.Order_Name</p>
                                                                        </div>

                                                                        @if (item.Order_Type == "特产")
                                                                        {
                                                                            if (item.Order_Status == 2)
                                                                            {
                                                                                <p style="color:#ff0000;">买家已付款<br />发货中...</p>
                                                                            }
                                                                            else if (item.Order_Status == 4)
                                                                            {
                                                                                <p style="color:#ff0000;">交易成功</p>
                                                                            }
                                                                            else if (item.Order_Status == 1)
                                                                            {
                                                                                <p style="color:#ff0000;">待点评</p>
                                                                            }
                                                                            else if (item.Order_Status == 0)
                                                                            {
                                                                                <p style="color:#ff0000;">待付款</p>
                                                                            }
                                                                        }
                                                                        else
                                                                        {
                                                                            if (item.Order_Status == 0)
                                                                            {
                                                                                <p style="color:#ff0000;">待付款</p>
                                                                            }
                                                                            else if (item.Order_Status == 1)
                                                                            {
                                                                                <p style="color:#ff0000;">待点评</p>

                                                                            }
                                                                            else if (item.Order_Status == 4)
                                                                            {
                                                                                <p style="color:#ff0000;">交易成功</p>
                                                                            }

                                                                        }
                                                                    </a>
                                                                    <p>订 单 号：@item.Order_No</p>

                                                                    <div class="aui-mail-product">

                                                                        <a href="javascript:;" class="aui-mail-product-item">

                                                                            <div class="aui-mail-product-item-hd">

                                                                                <img src="@item.Orde_PictureUrl" style="height:70px;width:70px;" alt="">

                                                                            </div>
                                                                            <div class="aui-mail-product-item-bd">
                                                                                <p>@item.Order_ProInfo</p>
                                                                                @if (item.Order_Type == "特产")
                                                                                {
                                                                                    <p id="ss">下单时间：@item.Order_ReserveTime</p>
                                                                                    if (item.Order_Status == 3)
                                                                                    {
                                                                                        <p id="ss">到货时间：@item.Order_OutingTime</p>
                                                                                    }
                                                                                }
                                                                                else if (item.Order_Type == "旅游")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss">出游时间：@item.Order_OutingTime</p>
                                                                                }
                                                                                else if (item.Order_Type == "团购")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss">出游时间：@item.Order_OutingTime</p>

                                                                                }
                                                                                else if (item.Order_Type == "餐饮")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss">就餐时间：@item.Order_OutingTime</p>
                                                                                }
                                                                                else if (item.Order_Type == "酒店")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss" class="IntoTime">入住时间：@item.Order_OutingTime</p>
                                                                                }
                                                                            </div>
                                                                        </a>
                                                                    </div>
                                                                    <a href="javascript:;" class="aui-mail-payment">
                                                                        @if (item.Order_Type == "特产")
                                                                        {
                                                                            <p style="color:#000000;">
                                                                                共<em>1</em>
                                                                                件商品 实付款: ￥
                                                                                <i>@item.Order_Money</i>
                                                                            </p>

                                                                        }
                                                                        else
                                                                        {
                                                                            <p style="color:#000000;">
                                                                                总价: ￥<i>@item.Order_Money</i>
                                                                            </p>
                                                                        }
                                                                    </a>
                                                                    <div class="aui-mail-button">
                                                                        @if (item.Order_Type == "特产")
                                                                        {
                                                                            if (item.Order_Status == 2)
                                                                            {
                                                                                <a href="javascript:;" id="Receiving" onclick="Show('@item.Order_Id','@item.Order_No')">确定收货</a>
                                                                            }
                                                                            else if (item.Order_Status == 1)
                                                                            {
                                                                                <a href="javascript:;" onclick="Evaluates('@item.Orde_PictureUrl','@item.Order_Id','@item.User_Id','@item.Order_Type')">评价</a>
                                                                            }
                                                                            else if (item.Order_Status == 0)
                                                                            {
                                                                                <a href="javascript:;" onclick="payment('@item.Order_Id','@item.Order_Money','@item.Order_Type')">付款</a>
                                                                                <a href="javascript:;" class="aui-df-color" onclick="CancelSpecialty('@item.Order_Id')">取消订单</a>
                                                                            }
                                                                            else if (item.Order_Status == 4)
                                                                            {
                                                                                <a href="javascript:;" style="border:none">已评价</a>
                                                                            }
                                                                        }
                                                                        else
                                                                        {
                                                                            if (item.Order_Status == 0)
                                                                            {
                                                                                <a href="javascript:;" onclick="payment('@item.Order_Id','@item.Order_Money','@item.Order_Type')">付款</a>
                                                                                <a href="javascript:;" class="aui-df-color" onclick="CancelSpecialty('@item.Order_Id')">取消订单</a>
                                                                            }
                                                                            else if (item.Order_Status == 1)
                                                                            {
                                                                                <a href="javascript:;" onclick="Evaluates('@item.Orde_PictureUrl','@item.Order_Id','@item.User_Id','@item.Order_Type')">评价</a>
                                                                            }
                                                                            else if (item.Order_Status == 4)
                                                                            {
                                                                                <a href="javascript:;" style="border:none">已评价</a>
                                                                            }

                                                                        }
                                                                    </div>
                                                                </div>
                                                                <div class="divHeight"></div>
                                                            }
                                                        }
                                                        @if (Comment.Count == 0)
                                                        {
                                                            <div style="text-align:center;">
                                                                <img src="~/images/download.png">
                                                                <h5>没有待点评的订单哦~</h5>
                                                            </div>
                                                        }





                                                    </div>

                                                </div>
                                            </div>
                                        </section>
                                    </section>


                                </div>
                                <div class="layui-tab-item">
                                    <section class="aui-flexView">
                                        <section class="aui-scrollView">
                                            <div class="aui-tab" data-ydui-tab>
                                                <div class="tab-panel">
                                                    <div class="tab-panel-item tab-active">
                                                        @foreach (var item in orders)
                                                        {
                                                            if (item.Order_Status == 2 && item.Order_Type == "特产")
                                                            {

                                                                <div class="tab-item">
                                                                    <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                                                        <div class="aui-well-item-hd">
                                                                            <img src="~/images/shop.png" style="height:80px">
                                                                        </div>
                                                                        <div class="aui-well-item-bd">
                                                                            <p id="oreder_Name" style="color:#000000;">商家名称:@item.Order_Name</p>
                                                                        </div>
                                                                        @if (item.Order_Type == "特产")
                                                                        {
                                                                            if (item.Order_Status == 2)
                                                                            {
                                                                                <p style="color:#ff0000;">买家已付款<br />发货中...</p>
                                                                            }
                                                                            else if (item.Order_Status == 4)
                                                                            {
                                                                                <p style="color:#ff0000;">交易成功</p>
                                                                            }
                                                                            else if (item.Order_Status == 1)
                                                                            {
                                                                                <p style="color:#ff0000;">待点评</p>
                                                                            }
                                                                            else if (item.Order_Status == 0)
                                                                            {
                                                                                <p style="color:#ff0000;">待付款</p>
                                                                            }
                                                                        }
                                                                        else
                                                                        {
                                                                            if (item.Order_Status == 0)
                                                                            {
                                                                                <p style="color:#ff0000;">待付款</p>
                                                                            }
                                                                            else if (item.Order_Status == 1)
                                                                            {
                                                                                <p style="color:#ff0000;">待点评</p>

                                                                            }
                                                                            else if (item.Order_Status == 4)
                                                                            {
                                                                                <p style="color:#ff0000;">交易成功</p>
                                                                            }

                                                                        }
                                                                    </a>
                                                                    <p>订 单 号：@item.Order_No</p>

                                                                    <div class="aui-mail-product">

                                                                        <a href="javascript:;" class="aui-mail-product-item">

                                                                            <div class="aui-mail-product-item-hd">

                                                                                <img src="@item.Orde_PictureUrl" style="height:70px;width:70px;" alt="">

                                                                            </div>
                                                                            <div class="aui-mail-product-item-bd">
                                                                                <p>@item.Order_ProInfo</p>
                                                                                @if (item.Order_Type == "特产")
                                                                                {
                                                                                    <p id="ss">下单时间：@item.Order_ReserveTime</p>
                                                                                    if (item.Order_Status == 1 || item.Order_Status == 4)
                                                                                    {
                                                                                        <p id="ss">到货时间：@item.Order_OutingTime</p>
                                                                                    }
                                                                                }
                                                                                else if (item.Order_Type == "旅游")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss">出游时间：@item.Order_OutingTime</p>
                                                                                }
                                                                                else if (item.Order_Type == "团购")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss">出游时间：@item.Order_OutingTime</p>

                                                                                }
                                                                                else if (item.Order_Type == "餐饮")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss">就餐时间：@item.Order_OutingTime</p>
                                                                                }
                                                                                else if (item.Order_Type == "酒店")
                                                                                {
                                                                                    <p id="ss">预定时间：@item.Order_ReserveTime</p>
                                                                                    <p id="ss" class="IntoTime">入住时间：@item.Order_OutingTime</p>
                                                                                }
                                                                            </div>
                                                                        </a>
                                                                    </div>
                                                                    <a href="javascript:;" class="aui-mail-payment">
                                                                        @if (item.Order_Type == "特产")
                                                                        {
                                                                            <p style="color:#000000;">
                                                                                共<em>1</em>
                                                                                件商品 实付款: ￥
                                                                                <i>@item.Order_Money</i>
                                                                            </p>

                                                                        }
                                                                        else
                                                                        {
                                                                            <p style="color:#000000;">
                                                                                总价: ￥<i>@item.Order_Money</i>
                                                                            </p>
                                                                        }
                                                                    </a>
                                                                    <div class="aui-mail-button">
                                                                        @if (item.Order_Type == "特产")
                                                                        {
                                                                            if (item.Order_Status == 2)
                                                                            {
                                                                                <a href="javascript:;" id="Receiving" onclick="Show('@item.Order_Id','@item.Order_No')">确定收货</a>
                                                                            }
                                                                            else if (item.Order_Status == 1)
                                                                            {
                                                                                <a href="javascript:;" onclick="Evaluates('@item.Orde_PictureUrl','@item.Order_Id','@item.User_Id','@item.Order_Type')">评价</a>
                                                                            }
                                                                            else if (item.Order_Status == 0)
                                                                            {
                                                                                <a href="javascript:;" onclick="payment('@item.Order_Id','@item.Order_Money','@item.Order_Type')">付款</a>
                                                                                <a href="javascript:;" class="aui-df-color" onclick="CancelSpecialty('@item.Order_Id')">取消订单</a>
                                                                            }
                                                                            else if (item.Order_Status == 4)
                                                                            {
                                                                                <a href="javascript:;" style="border:none">已评价</a>
                                                                            }
                                                                        }
                                                                        else
                                                                        {
                                                                            if (item.Order_Status == 0)
                                                                            {
                                                                                <a href="javascript:;" onclick="payment('@item.Order_Id','@item.Order_Money','@item.Order_Type')">付款</a>
                                                                                <a href="javascript:;" class="aui-df-color" onclick="CancelSpecialty('@item.Order_Id')">取消订单</a>
                                                                            }
                                                                            else if (item.Order_Status == 1)
                                                                            {
                                                                                <a href="javascript:;" onclick="Evaluates('@item.Orde_PictureUrl','@item.Order_Id','@item.User_Id','@item.Order_Type')">评价</a>
                                                                            }
                                                                            else if (item.Order_Status == 4)
                                                                            {
                                                                                <a href="javascript:;" style="border:none">已评价</a>
                                                                            }

                                                                        }
                                                                    </div>
                                                                </div>
                                                                <div class="divHeight"></div>
                                                            }
                                                        }
                                                        @if (Receivng.Count == 0)
                                                        {
                                                            <div style="text-align:center;">
                                                                <img src="~/images/download.png">
                                                                <h5>没有待收货的订单哦~</h5>
                                                            </div>
                                                        }
                                                    </div>

                                                </div>
                                            </div>
                                        </section>
                                    </section>

                                </div>


                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>





    <script src="~/js/jquery-3.3.1.min.js"></script>

    <script src="~/js/jquery-1.9.1.min.js"></script>
    <script src="~/layui-v2.5.4/layui/layui.all.js"></script>
    <script src="~/js/Order.js" type="text/html">
    </script>
    <script>

        //付款
        //特产 0是未付款, 1是待点评, 2是待收货,, 4是已点评
        //其他:0是未付款,1是待点评,4是已点评
        function payment(id, money, order_type) {
            if (order_type != "特产") {
                //待点评
                //1
            } else {
                //待收货
                //2
            }


        }
        //确定收货
        function Show(OrderId, OrderNo) {
            //跳转确认收货页面
            location.href = "/Home/Specialt_ConfirmReceipt?Order_Id=" + OrderId + "&&Order_No=" + OrderNo;
        }
        // 取消订单
        function CancelSpecialty(id) {
            layer.confirm("确定取消订单吗？", {
                btn: ['确定', '取消']
            }, function () {
                $.ajax({
                    url: "/Order/CancelSpecialty?id=" + id,
                    type: "post",
                    success: function (result) {
                        if (result.Success) {
                            window.location.reload();//刷新页面
                        }
                        else {
                            layer.msg('取消订单失败!');
                        }
                    }
                })
            }, function () {

            });
        }
        //用户评价
        function Evaluates(img, id, userid, type) {
            $("#ordername").text(name);
            $("#orderId").text(id)
            $("#User_Id").text(userid);
            $("#numnames").val(type);
            $("#Order_Type").text(type);
            $("#Order_img").attr('src', img);
            //评价div弹窗
            layer.open({
                type: 1,
                title: "评价",
                area: ['760px', '380px'],// area: ['760px', '550px'],
                shadeClose: true,
                content: $("#evaluate"),
                end: function () {
                    $("#evaluate").hide();
                },

            });
        }
        var numid = 0;
        var type = $("numnames").val();


        $("#btncomment").click(function () {

            if ($("#comment").val() != "") {
                var data = {};
                data.UserComment_PruId = $("#orderId").html();//产品Id
                data.UserComment_Content = $("#comment").val();//评价内容
                var number = 0;
                if ($("#numnames").val() == "特产") {
                    number = 1;
                } else if ($("#numnames").val() == "线路") {
                    number = 2;

                } else if ($("#numnames").val() == "酒店") {
                    number = 3;

                } else if ($("#numnames").val() == "饭店") {
                    number = 4;
                }
                data.UserComment_Type = number;//点评类型
                data.User_Id = $("#User_Id").html();//用户编号
                var num = 0;
                //判断点评几星
                if ($("#evaluatenum").html() == "极差") {
                    num = 1;
                }
                else if ($("#evaluatenum").html() == "差") {
                    num = 2;
                }
                else if ($("#evaluatenum").html() == "中等") {
                    num = 3;
                }
                else if ($("#evaluatenum").html() == "好") {
                    num = 4;
                }
                else if ($("#evaluatenum").html() == "极好") {
                    num = 5;
                }
                data.UserComment_GoodBad = num;//#好评/差评 1-5
                $.ajax({
                    url: "/Order/AddCommodityevaluate",
                    data: data,
                    type: "post",
                    success: function (result) {
                        if (result.Success) {
                            layer.msg('评价成功!');
                            $.ajax({
                                url: "/Order/Alreadyevaluated?id=" + $("#orderId").html(),
                                type: "post",
                                success: function (result) {
                                    if (result.Success) {
                                        window.location.reload();//刷新页面
                                    }
                                    else {
                                        layer.msg('请再试一次!');
                                    }
                                }
                            })
                        }
                        else {
                            layer.msg('评价失败!');
                        }
                    }
                })
            } else {
                layer.msg('评价内容不能为空!');
            }

        })


    </script>
    <script>
        layui.use(['rate'], function () {
            var rate = layui.rate;
            //自定义文本
            rate.render({
                elem: '#test5'
                , value: 3
                , text: true
                , setText: function (value) { //自定义文本的回调
                    var arrs = {
                        '1': '极差'
                        , '2': '差'
                        , '3': '中等'
                        , '4': '好'
                        , '5': '极好'
                    };
                    this.span.text(arrs[value] || (value + "星"));
                    $("#evaluatenum").text(arrs[value]);
                    if (arrs[value] == "极差") {
                        $("#numtest").text("亲，很抱歉没能给您带来良好的体验，如有不满，您可联系卖家协商或发起售后维权。");
                        $('#comment').attr('placeholder', "咳咳，您给了差评哦，亲可以先联系卖家沟通一下售后哦~");

                    } else if (arrs[value] == "差") {
                        $("#numtest").text("亲，很抱歉没能给您带来良好的体验，如有不满，您可联系卖家协商或发起售后维权。");
                        $('#comment').attr('placeholder', "咳咳，您给了差评哦，亲可以先联系卖家沟通一下售后哦~");

                    } else if (arrs[value] == "中等") {
                        $("#numtest").text("亲，很抱歉没能给您带来良好的体验，如有不满，您可联系卖家协商或发起售后维权。");
                        $('#comment').attr('placeholder', "咳咳，你给卖家打了中评，需要说明原因哦。");

                    } else if (arrs[value] == "好") {
                        $("#numtest").text("感谢亲的支持,下次一定做的更好");
                        $('#comment').attr('placeholder', "亲，写点评价吧，你的评价对其他用户有很大帮助的。");

                    } else if (arrs[value] == "极好") {
                        $("#numtest").text("感谢亲的支持,下次一定做的更好");
                        $('#comment').attr('placeholder', "亲，写点评价吧，你的评价对其他用户有很大帮助的。");
                    }
                }
            })
        });
        layui.use('element', function () {
            var $ = layui.jquery
                , element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块

            //触发事件
            var active = {
                tabAdd: function () {
                    //新增一个Tab项
                    element.tabAdd('demo', {
                        title: '新选项' + (Math.random() * 1000 | 0) //用于演示
                        , content: '内容' + (Math.random() * 1000 | 0)
                        , id: new Date().getTime() //实际使用一般是规定好的id，这里以时间戳模拟下
                    })
                }
                , tabDelete: function (othis) {
                    //删除指定Tab项
                    element.tabDelete('demo', '44'); //删除：“商品管理”


                    othis.addClass('layui-btn-disabled');
                }
                , tabChange: function () {
                    //切换到指定Tab项
                    element.tabChange('demo', '22'); //切换到：用户管理
                }
            };

            $('.site-demo-active').on('click', function () {
                var othis = $(this), type = othis.data('type');
                active[type] ? active[type].call(this, othis) : '';
            });

            //Hash地址的定位
            var layid = location.hash.replace(/^#test=/, '');
            element.tabChange('test', layid);

            element.on('tab(test)', function (elem) {
                location.hash = 'test=' + $(this).attr('lay-id');
            });

        });
    </script>


</body>
</html>